package org.akomantoso.core.io.util.group;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.akomantoso.core.data.Citations;
import org.akomantoso.core.data.Container;
import org.akomantoso.core.data.Recitals;
import org.akomantoso.core.data.group.PreambleContainers;
import org.akomantoso.core.io.util.Instantiator;

/**
 * @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
 */
public final class PreambleContainersGroup {

	private PreambleContainersGroup() {
	}

	public static final Map<String, Instantiator<PreambleContainers>> MAP;

	static {

		Map<String, Instantiator<PreambleContainers>> temp = new HashMap<String, Instantiator<PreambleContainers>>();

		// citations
		temp.put(Citations.ELEMENT, new Instantiator<PreambleContainers>() {
			public Citations instantiate() {
				return new Citations();
			}
		});

		// recitals
		temp.put(Recitals.ELEMENT, new Instantiator<PreambleContainers>() {
			public Recitals instantiate() {
				return new Recitals();
			}
		});

		// container
		temp.put(Container.ELEMENT, new Instantiator<PreambleContainers>() {
			public Container instantiate() {
				return new Container();
			}
		});

		MAP = Collections.unmodifiableMap(temp);
	}

}
